package com.galaxy.product.domain.bo;

import com.galaxy.common.core.validate.AddGroup;
import com.galaxy.common.core.validate.EditGroup;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import com.galaxy.product.domain.ProductDetail;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 商品详情业务对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ProductDetail.class)
public class ProductDetailBo extends BaseEntity {
    /** 主键 */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;
    /** 商品ID */
    @NotNull(message = "商品ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long productId;
    /** 商品副标题 */
    @Size(max = 200, message = "副标题长度不能超过200个字符")
    private String subtitle;
    /** 商品描述 */
    private String description;
    /** 主图URL */
    @Size(max = 255, message = "主图URL长度不能超过255个字符")
    private String mainImage;
    /** 子图URL(JSON格式) */
    private String subImages;
    /** 容量数值 */
    private BigDecimal volume;
    /** 单位ID */
    private Long unitId;
    /** 销量 */
    private Integer sales;
    /** 是否热销(0:否,1:是) */
    private Integer isHot;
    /** 租户ID */
    private String tenantId;
} 